package com.open.account.interfaces.controller;


import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.ApiSort;
import com.open.account.interfaces.dto.*;
import com.open.account.interfaces.param.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.List;

@Api(value = "开户H5接口", tags = "开户H5接口")
@ApiSort(value = 1)
@RestController
@RequestMapping(path = "/open-account")
public class OpenAccountController {

    @ApiOperation(value = "获取开户进度", notes = "获取开户进度")
    @ApiOperationSupport(order = 1)
    @PostMapping("getOpenAccountStatus/v1")
    public Result<OpenAccountStatusRespDto> getOpenAccountStatus(@RequestBody @Validated OpenAccountStatusReq openAccountStatusReq,@RequestHeader("User-Session") String userSession) {
        return Result.success(new OpenAccountStatusRespDto());
    }

    @ApiOperation(value = "第一步居民类型选择数据初始化", notes = "第一步居民类型选择数据初始化")
    @ApiOperationSupport(order = 2)
    @PostMapping("selectResidenceTypeInit/v1")
    public Result<List<ResidenceTypeRespDto>> selectResidenceTypeInit() {
        return Result.success(new ArrayList<>());
    }

    @ApiOperation(value = "第一步提交居民类型", notes = "第一步提交居民类型")
    @ApiOperationSupport(order = 3)
    @PostMapping("submitResidenceType/v1")
    public Result<Boolean> submitResidenceType(@RequestBody @Validated SubmitResidenceTypeReq submitResidenceTypeReq,@RequestHeader("User-Session") String userSession) {
        return Result.success(Boolean.TRUE);
    }

    @ApiOperation(value = "开户第二步身份证识别数据初始化", notes = "开户第二步身份证识别数据初始化")
    @ApiOperationSupport(order = 4)
    @PostMapping("idCardOcrInit/v1")
    public Result<List<IDCardType>> idCardOcrInit() {
        return Result.success(new ArrayList<>());
    }

    @ApiOperation(value = "开户第二步身份证识别数据提交", notes = "开户第二步身份证识别数据提交")
    @ApiOperationSupport(order = 5)
    @PostMapping("submitIdCardOcr/v1")
    public Result<Boolean> submitIdCardOcr(@RequestBody @Validated SubmitIdCardOcrReq submitIdCardOcrReq,@RequestHeader("User-Session") String userSession) {
        return Result.success(Boolean.TRUE);
    }

    @ApiOperation(value = "开户第三步银行卡数据提交", notes = "开户第三步银行卡数据提交")
    @ApiOperationSupport(order = 6)
    @PostMapping("submitBankCard/v1")
    public Result<Boolean> submitBankCard(@RequestBody @Validated SubmitBankCardReq submitBankCardReq,@RequestHeader("User-Session") String userSession) {
        return Result.success(Boolean.TRUE);
    }

    @ApiOperation(value = "开户第五步提交账户类型，交易所", notes = "开户第五步提交账户类型，交易所")
    @ApiOperationSupport(order = 7)
    @PostMapping("submitAccountTypeAndMarket/v1")
    public Result<Boolean> submitAccountTypeAndMarket(@RequestBody @Validated SubmitAccountTypeAndMarketReq submitAccountTypeAndMarketReq,@RequestHeader("User-Session") String userSession) {
        return Result.success(Boolean.TRUE);
    }

    @ApiOperation(value = "开户第六步获取问卷信息", notes = "开户第六步获取问卷信息")
    @ApiOperationSupport(order = 8)
    @PostMapping("getRiskQuestionnaire/v1")
    public Result<RiskQuestionnaireRespDto> getRiskQuestionnaire(@RequestBody @Validated RiskQuestionnaireReq riskQuestionnaireReq,@RequestHeader("User-Session") String userSession) {
        return Result.success(new RiskQuestionnaireRespDto());
    }

    @ApiOperation(value = "开户第六步提交问卷调查信息", notes = "开户第六步提交问卷调查信息")
    @ApiOperationSupport(order = 9)
    @PostMapping("submitBasicInformation/v1")
    public Result<Boolean> submitBasicInformation(@RequestBody @Validated SubmitBasicInformationReq submitBasicInformationReq,@RequestHeader("User-Session") String userSession) {
        return Result.success(Boolean.TRUE);
    }

    @ApiOperation(value = "开户第七步提交签名", notes = "开户第七步提交签名")
    @ApiOperationSupport(order = 10)
    @PostMapping("submitSignature/v1")
    public Result<Boolean> submitSignature(@RequestBody @Validated SubmitSignatureReq submitSignatureReq,@RequestHeader("User-Session") String userSession) {
        return Result.success(Boolean.TRUE);
    }

    @ApiOperation(value = "开户第八步预览信息", notes = "开户第八步预览信息")
    @ApiOperationSupport(order = 11)
    @PostMapping("previewAccountInfo/v1")
    public Result<PreviewAccountInfoRespDto> previewAccountInfo(@RequestBody @Validated PreviewAccountInfoReq previewAccountInfoReq,@RequestHeader("User-Session") String userSession) {
        return Result.success(new PreviewAccountInfoRespDto());
    }

    @ApiOperation(value = "活体检测", notes = "活体检测")
    @ApiOperationSupport(order = 12)
    @PostMapping("submitFaceRecognition/v1")
    public Result<Boolean> submitFaceRecognition(@RequestBody @Validated SubmitFaceRecognitionReq submitFaceRecognitionReq,@RequestHeader("User-Session") String userSession) {
        return Result.success(Boolean.TRUE);
    }
    @ApiOperation(value = "ocr识别", notes = "ocr识别")
    @ApiOperationSupport(order = 13)
    @PostMapping("ocrIdentify/v1")
    public Result<OcrIdentifyRespDto> ocrIdentify(@RequestBody @Validated OcrIdentifyReq ocrIdentifyReq,@RequestHeader("User-Session") String userSession) {
        return Result.success(new OcrIdentifyRespDto<>());
    }

}
